﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:pc="http://schemas.microsoft.com/prototyping/2010/controls" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
	xmlns:pi="http://schemas.microsoft.com/prototyping/2010/interactivity"
	mc:Ignorable="d"
	x:Class="CYPlayerScreens.PlayListControl"
	x:Name="UserControl" Height="187.4" Width="153.7">

	<UserControl.Resources>

		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="ProjectDataSources.xaml"/>
			</ResourceDictionary.MergedDictionaries>

			<DataTemplate x:Key="ItemTemplate">
				<StackPanel VerticalAlignment="Bottom" Width="99.19" Opacity="1" OpacityMask="{x:Null}" Height="57.623" Background="{x:Null}">
					<Image Source="{Binding Image}" HorizontalAlignment="Center" Height="38.933" Width="37.867" VerticalAlignment="Center"/>
					<TextBlock Text="{Binding Name}" Style="{DynamicResource BasicTextBlock-Sketch}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
				</StackPanel>
			</DataTemplate>
			<DataTemplate x:Key="ItemTemplate1">
				<StackPanel Width="99.99">
					<Image Source="{Binding Image}" HorizontalAlignment="Center" Height="50.4" Width="50.4" VerticalAlignment="Center"/>
					<TextBlock Text="{Binding Name}" Style="{DynamicResource BasicTextBlock-Sketch}"/>
				</StackPanel>
			</DataTemplate>
			<!-- Sketch Button -->
			<Style x:Key="PLsStyle" TargetType="{x:Type Button}" BasedOn="{x:Null}">
				<Setter Property="FontFamily" Value="{DynamicResource FontFamily-Sketch}"/>
				<Setter Property="FontSize" Value="{DynamicResource SizeDouble-Sketch}"/>
				<Setter Property="Foreground" Value="{DynamicResource BaseForeground-Sketch}"/>
				<Setter Property="BorderBrush" Value="{DynamicResource BaseBorder-Sketch}"/>
				<Setter Property="Background" Value="{DynamicResource BaseBackground-Sketch}"/>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type Button}">
					<!-- We use Grid as a root because it is easy to add more elements to customize the button -->
							<Grid x:Name="Grid" Margin="-1.6,0,0,0">
						<!-- Content Presenter is where the text content etc is placed by the control -->
								<pc:SketchRectangleUC x:Name="SketchRectangleUC" BorderBrush="{TemplateBinding BorderBrush}" ExtensionLength="0" ExtensionVariance="0" StrokeWidth="2" SegmentLength="8" Background="{TemplateBinding Background}" SegmentVariance="0.1" SegmentOffset="0.12" FocusVisualStyle="{DynamicResource FocusControl-Sketch}"/>
								<ContentPresenter HorizontalAlignment="Right"  VerticalAlignment="Stretch" Content="{TemplateBinding Content}" Margin="0,3.466,3.2,4.266" d:LayoutOverrides="Height" Width="17.923"/>
							</Grid>
							<ControlTemplate.Triggers>
								<Trigger Property="IsMouseOver" Value="true">
									<Setter Property="Background" TargetName="SketchRectangleUC" Value="{DynamicResource MouseOverBackground-Sketch}"/>
								</Trigger>
								<Trigger Property="IsPressed" Value="True">
									<Setter Property="Background" TargetName="SketchRectangleUC" Value="{DynamicResource PressedBackground-Sketch}"/>
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
				<Setter Property="FontWeight" Value="{DynamicResource FontWeight-Sketch}"/>
				<Setter Property="FocusVisualStyle" Value="{DynamicResource FocusControl-Sketch}"/>
				<Style.Triggers>
					<Trigger Property="IsEnabled" Value="False">
						<Setter Property="Foreground" Value="{DynamicResource DisabledForeground-Sketch}"/>
						<Setter Property="BorderBrush" Value="{DynamicResource DisabledBorder-Sketch}"/>
					</Trigger>
				</Style.Triggers>
			</Style>
			<Style x:Key="LabelNameStyle" TargetType="{x:Type Label}">
				<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
				<Setter Property="Background" Value="Transparent"/>
				<Setter Property="Padding" Value="5"/>
				<Setter Property="HorizontalContentAlignment" Value="Left"/>
				<Setter Property="VerticalContentAlignment" Value="Top"/>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type Label}">
							<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true" Margin="0,0.8,0,2.533" Width="40.75">
								<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Stretch" Margin="-5,-5,0,-5.04" Width="40.75"/>
							</Border>
							<ControlTemplate.Triggers>
								<Trigger Property="IsEnabled" Value="false">
									<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
		</ResourceDictionary>
	</UserControl.Resources>

	<Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource CurrentPL}}">
		<i:Interaction.Behaviors>
			<ei:MouseDragElementBehavior/>
		</i:Interaction.Behaviors>
		<pc:SketchRectangleUC Style="{DynamicResource Rectangle-Sketch}" Radius="4"/>
		<ListBox x:Name="SongsLb" Margin="8.5,46.96,7.5,21.467" Style="{DynamicResource ListBox-Sketch}" BorderThickness="0.5" ItemTemplate="{DynamicResource ItemTemplate1}" ItemsSource="{Binding Collection}" Background="{x:Null}"/>
		<Button Margin="111.066,8,8,0" Style="{DynamicResource Button-Sketch}" FontSize="8" ClipToBounds="True" Height="16" VerticalAlignment="Top">
			<Grid x:Name="grid" Height="9" Width="8.8" RenderTransformOrigin="0.538,0.5">
				<Path Data="M176,48 L184,56" Fill="#FFF4F4F5" Stretch="Fill" Stroke="Black" Margin="0,0,-0.2,0"/>
				<Path x:Name="path" Data="M184,48 L176,56" Fill="#FFF4F4F5" Stretch="Fill" Stroke="Black" Margin="0,0,-0.2,0"/>
			</Grid>
		</Button>
		<Button Content="+" Margin="8.5,0,0,4.002" Style="{DynamicResource Button-Sketch}" FontSize="12" FontWeight="SemiBold" FontFamily="/CYPlayer.Screens;component/Fonts/#SketchFlow Print" HorizontalAlignment="Left" Width="24" Height="16.133" VerticalAlignment="Bottom"/>
		<Button Content="-" Margin="36.5,0,0,4.002" Style="{DynamicResource Button-Sketch}" FontSize="12" FontWeight="SemiBold" FontFamily="/CYPlayer.Screens;component/Fonts/#SketchFlow Print" HorizontalAlignment="Left" Width="24" Height="16.133" VerticalAlignment="Bottom"/>
		<Button Content="S" Margin="64.5,0,0,4.002" Style="{DynamicResource Button-Sketch}" FontSize="12" FontWeight="SemiBold" FontFamily="/CYPlayer.Screens;component/Fonts/#SketchFlow Print" HorizontalAlignment="Left" Height="16.133" VerticalAlignment="Bottom"/>
		<Button Content="L" Margin="93.3,0,0,4.002" Style="{DynamicResource Button-Sketch}" FontSize="12" FontWeight="SemiBold" FontFamily="/CYPlayer.Screens;component/Fonts/#SketchFlow Print" HorizontalAlignment="Left" Width="24.8" Height="16.133" VerticalAlignment="Bottom"/>
		<TextBlock HorizontalAlignment="Stretch" Margin="8.5,5.997,43.883,0" Style="{DynamicResource SubtitleCenter-Sketch}" Text="PL window" Height="22.003" VerticalAlignment="Top"/>
		<Button Content="MLs" Margin="122.1,0,0,4.002" Style="{DynamicResource PLsStyle}" FontSize="8" FontWeight="SemiBold" FontFamily="/CYPlayer.Screens;component/Fonts/#SketchFlow Print" HorizontalAlignment="Left" Width="23.6" Height="16.133" VerticalAlignment="Bottom"/>
		<Label Content="Name:" HorizontalAlignment="Left" Margin="8.5,31,0,0" Height="11.96" FontSize="10.667" VerticalAlignment="Top" Style="{DynamicResource LabelNameStyle}" FontFamily="/CYPlayer.Screens;component/Fonts/#SketchFlow Print" Width="40.217" FontWeight="Bold"/>
		<TextBox Margin="48.717,29.5,8,0" Style="{DynamicResource TextBox-Sketch}" TextWrapping="Wrap" Text="SamplePlaylist" VerticalAlignment="Top" Height="15.96" FontSize="12"/>
	</Grid>
</UserControl>